from urllib import request,parse
url="https://www.baidu.com/s?wd="
headers={
    "User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
}
name=parse.quote("蔡徐坤")
url=url+name
req=request.Request(url=url,headers=headers)
response=request.urlopen(req)
content=response.read().decode("utf-8")
print(content)